package com.pshcp.common.enums;

/**
 * @Description: 支付业务 0挂号支付 1在线咨询
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum PayBusinessEnum {

    REG_PAY(0, "预约挂号"),

    ONLINE_PAY(1, "在线咨询"),

    UNPAID_FEE_PAY(2, "诊间支付"),

    MEDICAL_PRINT_FEE_PAY(3, "病案支付"),
    ;

    private Integer code;
    private String desc;

    PayBusinessEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(int code){
        for(PayBusinessEnum e : PayBusinessEnum.values()){
            if(e.getCode().intValue() == code){
                return e.getDesc();
            }
        }
        return null;
    }

}
